package jacob.util;

import org.apache.commons.collections.MapUtils;

import java.security.Key;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by zjl on 2017/12/30.
 */
public class KeyUtil {

    static Map<String,Map<Integer,String[]>> keyMap = new HashMap<>();

    static Map<Integer,String[]> keys = new HashMap<>();

    static {
        String[] k1 = new String[]{"e4af3259c","a5a2cf74ff704501a4fb4d93f3920b6a"};
        keys.put(1,k1);
        String[] k2 = new String[]{"3fbdc0cd2","f2a5cb50011ede98357791cbcd4cdcc2"};
        keys.put(2,k2);
        String[] k3 = new String[]{"e3d59bd0c","252dca5e3675303fc3b6201ee70c41f4"};
        keys.put(3,k3);
        String[] k4 = new String[]{"56edd2cc2","e42c50d552e5eb155f1d9c65df114fb9"};
        keys.put(4,k4);
        String[] k5 = new String[]{"df0cc4146","ef4a3f0fd8bc158848925882c31540b2"};
        keys.put(5,k5);
        String[] k6 = new String[]{"0e1c68e2e","f7cec708008821485060d5b6fdb400de"};
        keys.put(6,k6);
        String[] k7 = new String[]{"3cf65c0c1","cd5d2db8f3d37c29bf8193dd582c8a46"};
        keys.put(7,k7);
        String[] k8 = new String[]{"6783b7d44","ab6dad7ebbae5367b44accb1888cc07f"};
        keys.put(8,k8);
        String[] k9 = new String[]{"732e14fe4","9aa369346ddcfa6406d4ed95c5453f1e"};
        keys.put(9,k9);
        String[] k10 = new String[]{"de0acce58","3e1335f7a4922c5ab2b1b6cd16ce16c0"};
        keys.put(10,k10);
        String[] k11 = new String[]{"f97bff3b4","1edcdc364ca6347159dbc23bf1bdf806"};
        keys.put(11,k11);
        String[] k12 = new String[]{"ba4a0d64b","c0bc858d7f9f773c9e7076c4934fa95c"};
        keys.put(12,k12);
        String[] k13 = new String[]{"dc9700d89","3a5fe7ad6c8c3644279fb5d822140132"};
        keys.put(13,k13);
        String[] k14 = new String[]{"4be4b9b79","94e731db2077bec625c61b8cc0c35369"};
        keys.put(14,k14);
        String[] k15 = new String[]{"91d3d463f","e9a44643eb4eb1b94568161fe00de8bc"};
        keys.put(15,k15);

        keyMap.put("永澄",keys);
        Map<Integer,String[]> jk = new HashMap<>();
        String[] y1 = new String[]{"b378f8be6","597d70b8ff9f0a893df7f9d655c68b78"};
        jk.put(1,y1);
        String[] y2 = new String[]{"4f2c044bb","c56dedf7b8ce4ce5b9860201409fd95c"};
        jk.put(2,y2);
        String[] y3 = new String[]{"0fa292cf5","edb41b551f67e191eacd93ffdf524e57"};
        jk.put(3,y3);
        String[] y4 = new String[]{"eec8a7d11","078050d85190f279f1d25755cdbe38e5"};
        jk.put(4,y4);
        String[] y5 = new String[]{"721a25880","ad876d515c2aa481f0cc22596e36d28a"};
        jk.put(5,y5);
        String[] y6 = new String[]{"6ae974ab2","97497cb50da3a0592ceff939a52dbab1"};
        jk.put(6,y6);
        String[] y7 = new String[]{"c310192ee","4a1650298cdb32d24f9934671ed8950e"};
        jk.put(7,y7);
        String[] y8 = new String[]{"5bf2e0e53","cfd2d7877a8e402625168241f049c314"};
        jk.put(8,y8);
        String[] y9 = new String[]{"6c48b43a7","ddaeb246f015b6aa63bb22e5ec4153ca"};
        jk.put(9,y9);
        String[] y10 = new String[]{"3ed362a5f","6c7412dbc162449ae8466d02a6954ceb"};
        jk.put(10,y10);
        String[] y11 = new String[]{"445af7064","23d5634a6875154b48a995c964a4787d"};
        jk.put(11,y11);
        String[] y12 = new String[]{"9720d72c9","6134a1d0eeb93a42878d9b9b708e6e53"};
        jk.put(12,y12);

        String[] y13 = new String[]{"18fea55ae","9452a45b78e36b502311cf353006e75c"};
        jk.put(13,y13);
        String[] y14 = new String[]{"08e5a2909","9c4bd7a1c5dd6278d89ab24fa4639a10"};
        jk.put(14,y14);
        String[] y15 = new String[]{"4e47d915c","7ceaf8cd2259d3fe468359904de362d2"};
        jk.put(15,y15);
        String[] y16 = new String[]{"d081b7634","ce26c9af35d03f6b58907a7ba872c5fc"};
        jk.put(16,y16);

        keyMap.put("的",jk);

    }


    public static String[] getKey(String desc,Integer i){
        Map<Integer, String[]> integerMap = keyMap.get(desc);
        if(MapUtils.isNotEmpty(integerMap)){
            String[] strings = integerMap.get(i);
            return strings;
        }
        return null;
    }
}
